#include "Light.h"

namespace Engine
{
	void Light::Draw()
	{
		//set position and type of light
		GLfloat lightDirection [] = {m_pos.x, m_pos.y, m_pos.z, 
			                         static_cast <float> (m_type)};
	
		glLightfv(m_lightID, GL_POSITION, lightDirection);
		glLightfv(m_lightID, GL_AMBIENT, m_material.GetAmbience().ToArray());
		glLightfv(m_lightID, GL_DIFFUSE, m_material.GetDiffuse().ToArray());
		glLightfv(m_lightID, GL_SPECULAR, m_material.GetSpecular().ToArray());
		glLightf(m_lightID, GL_SHININESS, m_material.GetShininess());
	}
}
